unit frmMainFrame;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, StdCtrls;

type
  TMainFrame = class(TFrame)
    lblPathAndFileName: TLabel;
    lblPath: TLabel;

  private
    { Private declarations }
  public
    constructor Create(AOwner: TComponent); override;

  end;

implementation

{$R *.dfm}


{ TMainFrame }

constructor TMainFrame.Create(AOwner: TComponent);
var
  path, exename: String;

begin
  inherited;
  exename := application.ExeName;
  path := '';

  while pos('\',exename) > 0 do
  begin
      path := path + Copy(exename,1,pos('\',exename));
      Delete(exename,1,pos('\',exename));
  end;

  lblPathAndFileName.Caption := exename;
  lblPath.Caption := path;
end;


end.
